package org.lakeside.outreach.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class WindowPanel extends Composite {

	VerticalPanel outer = new VerticalPanel();
	HorizontalPanel titleBar = new HorizontalPanel();
	
	public WindowPanel() {
		this("");
	}
	
	public WindowPanel(String title) {
		// Assemble title bar
		final HTML titleDiv = new HTML(title);
		titleBar.add(titleDiv);
		titleBar.setStyleName("titleBar");
		
		outer.add(titleBar);
		outer.setStyleName("windowPanel");
		
		initWidget(outer);
	}
	
	public void add(Widget w) {
		outer.add(w);
	}
}
